<?php 

trait A
{
    public function demo()
    {
        echo "A中的demo...<br>";
    }
}

trait B
{
    public function demo1()
    {
        echo "B中的demo1...<br>";
    }
}


class User
{
    use A,B;
    public function say()
    {
        echo 'User中的say...<br>';
    }
}

$u = new User();
var_dump($u);
$u->demo();
$u->demo1();
$u->say();


